﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using ActionMailer.Net.Mvc;
using ORM.Business.Models.Entities;
using ORM.Common;
using ORM.ViewModels.Account;
using ORM.Web.ViewModels.Account;
using System.Text;
using System.Net.Mail;
using ORM.Web.ViewModels.Mail;

namespace ORM.Controllers
{
    public class MailController : MailerBase
    {
        //
        // GET: /Mail/
        public EmailResult ResetPasswordVerificationEmail(RequestResetPasswordViewModel vm)
        {
            To.Add(vm.Email);
            From = AppConfigs.SiteEmail;
            Subject = "Xác nhận quên mật khẩu - Fixtech.vn";
            MessageEncoding = Encoding.Unicode;
            return Email("ResetPasswordVerificationEmail", vm);
        }
      
        public EmailResult WelcomeEmailUserOpenId(user user)
        {
            To.Add(user.Email);
            From = AppConfigs.SiteEmail;
            Subject = "Chào mừng tới Fixtech.vn";
            MessageEncoding = Encoding.Unicode;
            return Email("WelcomeEmailUserOpenId", user);
        }
        public EmailResult WelcomeEmail(RegisterViewModel vm)
        {
            To.Add(vm.Email);
            From = AppConfigs.SiteEmail;
            Subject = "Chào mừng tới Fixtech.vn";
            MessageEncoding = Encoding.Unicode;
            return Email("WelcomeEmail", vm);
        }

    }
}
